home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
CU Amiga Super CD-ROM 21
/
CU Amiga Magazine's Super CD-ROM 21 (1998)(EMAP Images)(GB)[!][issue 1998-04].iso
/
CUCD
/
Programming
/
SP-ProjectMan
/
Rexx
/
edit.sman
next >
Wrap
Text File
|
1997-12-30
|
1KB
|
53 lines
/*
- Edit.sman
-
- ARexx program to edit the content of a file.
- The editor tool depends of the file extension.
- The tool is launched asynchronously.
-
- © Copyright 1995-1996 Bernard Krummenacher Silicon-Peace
-
- Bernard Krummenacher Silicon-Peace 95.04.11 Created this file.
- Bernard Krummenacher Silicon-Peace 96.08.14 Tried to make it usable with almost any Amiga..
*/
parse arg FileName '.' Extension
options results
if (UPPER(Extension) = 'MUIB') then
address COMMAND 'mui:muibuilder/muibuilder ' '"'FileName'.'Extension'"'
else
if (((lastpos('SCOPTIONS',upper(FileName)) + 8) = length(FileName)) & (Extension = '')) then
do
path = left(FileName,lastpos('/',FileName))
oldPath = pragma('Directory',path)
address COMMAND 'scopts'
pragma('Directory',oldPath)
end;
else
/*
if (UPPER(Extension) = 'GUIDE') then
address COMMAND 'Appls:Outils/AmigaGuide/Heddley/Heddley ' FileName'.'Extension
else
*/
do
EnvVar = 'env:editor'
if (EXISTS(EnvVar)) then
do
if OPEN(EditorVar,'env:editor','R') then
do
Editor = READLN(EditorVar)
if CLOSE(EditorVar) then
nop
end;
end;
else
Editor = 'ed'
if (Extension = '') then
address COMMAND Editor '"'FileName'"'
else
address COMMAND Editor '"'FileName'.'Extension'"'
end;
return 0